<script setup lang="ts">
import { RouterView } from 'vue-router'
// import HelloWorld from './components/HelloWorld.vue'
</script>

<template>
  <el-container class="page">
    <el-header style="background-color: #79bbff" height="64px"> </el-header>
    <el-container>
      <el-aside width="240px" class="aside">
        <ElMenu :router="true" style="background-color: #79bbff;">
          <!-- //开启router模式 -->
          <ElSubMenu index="1" style="background-color: #79bbff;">
            <template #title>
              <el-icon><Share /></el-icon>
              <div>区域总管</div>
            </template>
            <!-- <RouterLink to="/">Home</RouterLink> -->
            <ElMenuItem index="/area" style="background-color: #d9ecff;"
              ><el-icon><Histogram /></el-icon>区域管理</ElMenuItem
            ><ElMenuItem index="/city"
              ><el-icon><Tools /></el-icon>城市信息</ElMenuItem
            >
            <!-- <RouterLink to="/about">About</RouterLink>  -->
          </ElSubMenu>
        </ElMenu>
      </el-aside>
      <el-main class="main"
        ><div><RouterView /></div
      ></el-main>
    </el-container>
  </el-container>
</template>

<style scoped>
.page {
  height: 100vh;
}
.aside {
  background-color:  #79bbff;
}
.main {
  background-color: rgb(234, 239, 239);
}
header {
  line-height: 1.5;
  max-height: 100vh;
}

.logo {
  display: block;
  margin: 0 auto 2rem;
}

nav {
  width: 100%;
  font-size: 12px;
  text-align: center;
  margin-top: 2rem;
}

nav a.router-link-exact-active {
  color: var(--color-text);
}

nav a.router-link-exact-active:hover {
  background-color: transparent;
}

nav a {
  display: inline-block;
  padding: 0 1rem;
  border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
  border: 0;
}

@media (min-width: 1024px) {
  header {
    display: flex;
    place-items: center;
    padding-right: calc(var(--section-gap) / 2);
  }

  .logo {
    margin: 0 2rem 0 0;
  }

  header .wrapper {
    display: flex;
    place-items: flex-start;
    flex-wrap: wrap;
  }

  nav {
    text-align: left;
    margin-left: -1rem;
    font-size: 1rem;

    padding: 1rem 0;
    margin-top: 1rem;
  }
}
</style>
